﻿<!DOCTYPE html>
<!--法律法规清单管理-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="/static/js/common.js"></script>

    <style>
        .el-dialog__body {
            height: 100% !important;
        }

        .el-dialog.is-fullscreen {
            overflow: hidden !important;
        }

        .el-dialog__wrapper {
            position: absolute !important;
        }
    </style>
</head>

<body>

    <div id="app" v-cloak>
        <!--按钮-->
        <el-form label-position="right" ref="form" :inline="true" :model="formInline" class="demo-form-inline"
            style="margin-bottom: 15px;">
            <!--按钮-->
            <el-row >
                <el-col class="head-tool">

                    <div class="new_title fl"><strong><img src="/static/images/icon1.png" />法律法规清单管理列表</strong></div>
                    <span>
                        <btn :text="col.btnSelect" imgsrc="/static/images/search.png" linetype="3" @click="onSubmit">
                        </btn>
                        <btn :text="col.btnAdd" linetype="3" @click="lawListAdd('tj')"></btn>
                        <btn-uploadfile-list url="/api/FL_StandardInformationWeb/Import" linetype="3"></btn-uploadfile-list>
                        <btn-export-list url="/api/FL_StandardInformationWeb/exportMesQD" :forminline="this.formInline" linetype="3"></btn-export-list>
                        <btn :text="col.btnDelete" linetype="4" @click="onDelete"></btn>

                    </span>
                </el-col>
            </el-row>
            <!--按钮下方文字-->
            <el-row class="popupW100">
                <!--工厂组件-->
                <list-factorys @change="factoryChange" v-model="formInline.model.createFactory"></list-factorys>
                <!--第一行第一列【文件级别】-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{LawRegulationsTable.FileLeve+mark.m}}
                                </template>
                                <el-select @visible-change="visibleChange" v-model="formInline.model.FileLeve" :placeholder="LawRegulationsTable.FileLeve" slot="suffix">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option v-for="item in FileLevel" :label="item.fileLeve" :value="item.id">
                                    </el-option>
                                </el-select>

                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <!--备注-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input v-model="formInline.model.Remarks" :placeholder="LawRegulationsTable.Remarks"
                                      size="mini">
                                <template slot="prepend">
                                    {{LawRegulationsTable.Remarks+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>
        </el-form>

        <!--下方表格-->
        <el-table stripe ref="table" :data="ListItem.tableData" :row-key="getRowKeys" :height="ListItem.tableHeight"
                  border @selection-change="handleSelectionChange" row-style="height:10px" style="width: 100%;">
            <!--复选框-->
            <el-table-column type="selection" style="padding-top: 0px;padding-bottom: 0px;" align="center" width="55"
                             :reserve-selection="true">
            </el-table-column>
            <!--复选框结束-->
            <!--第一列【序号：width:55】-->
            <!--<el-table-column prop="id" :label="LawRegulationsTable.id" width="55">
    </el-table-column>-->
            <el-table-column type="index" :label="LawRegulationsTable.id" show-overflow-tooltip="true" width="50" :index="indexMethod"></el-table-column>
            <!--第二列【文件级别：width:120】-->
            <el-table-column prop="mark01" :label="LawRegulationsTable.FileLeve" show-overflow-tooltip="true"
                             min-width="110">
            </el-table-column>
            <!--第三列【法律法规名称】-->
            <el-table-column prop="lawRegulationsName" show-overflow-tooltip="true" min-width="200"
                             :label="LawRegulationsTable.LawRegulationsName">
                <template slot-scope="scope">
                    <el-button type="text" @click="label_click('xz',scope.row.id)">
                        {{scope.row.lawRegulationsName}}
                    </el-button>
                </template>
            </el-table-column>
            <!--第四列【发布主体】-->
            <el-table-column prop="issueSubject" :label="LawRegulationsTable.IssueSubject" min-width="150"
                             show-overflow-tooltip="true">
            </el-table-column>
            <!--第五列【文号/标准号】-->
            <el-table-column prop="symbol" :label="LawRegulationsTable.Symbol" min-width="120"
                             show-overflow-tooltip="true">
            </el-table-column>
            <!--第六列【颁布日期：width:110】-->
            <el-table-column prop="issueDate" :label="LawRegulationsTable.IssueDate" width="120" :formatter="myformatDate">
            </el-table-column>
            <!--第七列【实施日期：width:110】-->
            <el-table-column prop="implementationDate" :label="LawRegulationsTable.ImplementationDate" width="120" :formatter="myformatDate">
            </el-table-column>
            <!--第八列【适用条款】-->
            <el-table-column prop="applyClause" :label="LawRegulationsTable.ApplyClause" min-width="120"
                             show-overflow-tooltip="true">
            </el-table-column>
            <!--第九列【归口专业管理】-->
            <el-table-column prop="mark03" :label="LawRegulationsTable.BelongToClass" min-width="120"
                             show-overflow-tooltip="true">
            </el-table-column>
            <!--第十列【具体实施和执行者】-->
            <el-table-column prop="mark04" :label="LawRegulationsTable.SpecificImplement" min-width="140"
                             show-overflow-tooltip="true">
            </el-table-column>
            <!--第十一列【了解】-->
            <el-table-column prop="mark05" :label="LawRegulationsTable.Understand" min-width="120"
                             show-overflow-tooltip="true">
            </el-table-column>
            <!--第十二列-->
            <el-table-column prop="remarks" show-overflow-tooltip="true" min-width="110"
                             :label="LawRegulationsTable.Remarks">
            </el-table-column>
            <!--表格修改按钮-->
            <el-table-column width="53" prop="update" :label="col.btnUpdate" fixed="right">
                <template slot-scope="scope">
                    <button type="button" class="elst-bt-xg" @click=lawListUpdate('xg',scope.row.id)>
                        <i class="el-icon-edit"></i>
                    </button>
                </template>
            </el-table-column>

        </el-table>

        <!--分页-->
        <el-row type="flex" justify="end">


            <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                :layout="ListItem.layout" :total="ListItem.total">
            </el-pagination>

        </el-row>

        <!--弹出层-->
        <el-dialog title="法律法规清单管理" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%" height="80%"
            top="10vh" fullscreen="true">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script>
        var app = new Vue({
            el: '#app',
            data: {
                ListItem: ListItem,
                FileLevel: [],
                formInline: {
                    model: {
                        createFactory: null,
                        FileLeve: '',
                        Remarks: '',
                        issueSubject: "",
                        implementationDate: null,
                        gkbm: null,
                        zxbm: null,
                    },
                    offset: 0,
                    limit: 10
                }
            },
            mounted: function () {
              //  this.FileLeve = getDicData('65');
                //初始化数据
             //   this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
                //初始化数据
                this.$nextTick(function () {
                   
                });
                this.GetLevelData();
            },

            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                factoryChange: function () {
                    //var aa = this.formInline.model.createFactory;
                    this.GetPageData(1);
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                //获取分页数据push
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/FL_StandardInformationWeb/GetList') },
                //添加操作
                lawListAdd: function (val, id) { id = this.ListItem.total; DialogShow(this, val, "LawRegulationListAdministrationInput.html", id); },
                //修改操作
                lawListUpdate: function (val, id) { DialogShow(this, val, "LawRegulationListAdministrationInput.html", id); },
                //查询
                onSubmit: function () { },
                //列表选择触发方法--配合删除方法实现
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
                //删除
                onDelete: function () { onDelete(this, '/api/FL_StandardInformationWeb/DeleteMuti'); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); },
                //查询方法
                onSubmit: function () { onSubmit(this); },
                //导出--暂时此提示--之后跟官标实现
                FileExcel: function () {
                    myAjax("post", this, '/api/LawRegulationListAdministration/export', null,
                        function (response) {
                            console.log(response);
                            if (response.result == "Success") {
                                showMessage(response.message, 'success');
                            }
                            else {
                                showMessage(response.message, 'fail');
                            }

                        });
                },
                //点击表格中数据发生方法
                label_click: function (val, id) { DialogShow(this, val, "LawRegulationListAdministrationInputDetails.html", id); },

                GetLevelData: function () {
                    var mythis = this;
                    myAjax("post", mythis, '/api/FL_FileLevel/GetList', { model: {}, offset: 0, limit: 10 }, function (response) {
                        mythis.FileLevel = response.data.pageData
                    });
                },

            },
        })
    </script>
</body>

</html>